//
//  Color-Header.swift
//  1meeting
//
//  Created by zhangheng on 2019/7/29.
//  Copyright © 2019 www.zhangheng.com. All rights reserved.
//

import Foundation
import Cocoa

func color_rgba(r:CGFloat,g:CGFloat,b:CGFloat,a:CGFloat=1.0) -> NSColor {
    return NSColor.init(red: r/255.0, green: g/255.0, blue: b/255.0, alpha: a)
}

//随机颜色
func color_random_rgba() -> NSColor{
    let red = CGFloat(arc4random()%256)/255.0
    let green = CGFloat(arc4random()%256)/255.0
    let blue = CGFloat(arc4random()%256)/255.0
    return NSColor(red: red, green: green, blue: blue, alpha: 1.0)
}

func color_gray(_ g:CGFloat,alpha:CGFloat=1.0) -> NSColor {
    return NSColor.init(red: g/255.0, green: g/255.0, blue: g/255.0, alpha: alpha)
}



//主色调
let color_main108       = color_rgba(r: 50, g: 108, b: 240, a: 1.0)
let color_main140       = color_rgba(r: 0, g: 140, b: 255, a: 1.0)
let color_pay           = color_rgba(r: 235, g: 115, b: 90, a: 1.0)
let color_mainGreen     = color_rgba(r: 0, g: 220, b: 60, a: 1.0)


